<?php
	global $_W,$_GPC;
	if($_W['role']){
		$name = $_GPC['categoryname'];
		$order = $_GPC['category_order'];
		$bg_color = $_GPC['bg_color'];
		$ins = pdo_insert('mii_ang_class',array('uniacid'=>$_W['uniacid'],'pid'=>'0','categoryname'=>$name,'category_order'=>$order,'ishide'=>'1','bg_color'=>$bg_color));
		if($ins){
			$code = array('status'=>'1','msg'=>'保存成功');
			exit(json_encode($code));
		}else{
			$code = array('status'=>'2','msg'=>'保存失败');
			exit(json_encode($code));			
		}
	}else{
		$code =  array('status'=>'2','msg'=>'没有操作权限');
		echo  json_encode($code);
		exit();
	}
?>